home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / System7 tools / Frontier / Frontier SDK 2.1 / Toolkits / IAC Tools / iac.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-22  |  6.7 KB  |  303 lines  |  [TEXT/KAHL]

  1.  
  2. /*© Copyright 1989-1993 UserLand Software, Inc.  All Rights Reserved.*/
  3.  
  4.  
  5. #define __IAC__ /*so other modules can tell that we've been included*/
  6.  
  7.  
  8. #ifndef __APPLEEVENTS__
  9.  
  10.     #include <AppleEvents.h>
  11.  
  12. #endif
  13.  
  14.  
  15. typedef struct tyIACglobals { /*this global record helps keep param lists short*/
  16.     
  17.     pascal short (*waitroutine) (EventRecord *);
  18.     
  19.     AppleEvent *event; /*the current event being processed*/
  20.     
  21.     AppleEvent *reply; /*the reply to the current event*/
  22.     
  23.     long refcon; /*the refcon info passed with the message*/
  24.     
  25.     OSType idprocess; /*creator id of the process we're running inside of*/
  26.     
  27.     OSErr errorcode; /*the specific error code returned from the Apple Event Manager*/
  28.     
  29.     Boolean nextparamoptional; /*if true, any IACgetxxxparam won't cause error if param isn't there*/
  30.     } tyIACglobals;
  31.     
  32. extern tyIACglobals IACglobals;
  33.  
  34.  
  35. typedef pascal Boolean (*tyFScallback) (FSSpec *);
  36.  
  37. typedef pascal OSErr (*tyAEHandler) (AppleEvent *, AppleEvent *, long);
  38.  
  39. typedef pascal void (*tyAsynchCallback) (AppleEvent *);
  40.  
  41.  
  42.  
  43. /*iac.c*/
  44.     
  45.     Boolean IACinit (void);
  46.     
  47.     Boolean IAChaveappleevents (void);
  48.     
  49.     Boolean IACinstallhandler (AEEventClass, AEEventID, ProcPtr);
  50.     
  51.     Boolean IACremovehandler (AEEventClass, AEEventID, ProcPtr);
  52.     
  53.     Boolean IAChandlerinstalled (OSType, OSType, Boolean);
  54.     
  55.     Boolean IACinstallcoercionhandler (DescType, DescType, ProcPtr);
  56.     
  57.     Boolean IACnewverb (OSType, OSType, OSType, AppleEvent *);
  58.     
  59.     Boolean IACsendverb (AppleEvent *, AppleEvent *);
  60.     
  61.     Boolean IACsendverbnoreply (AppleEvent *, AppleEvent *);
  62.     
  63.     Boolean IACdisposeverb (AppleEvent *);
  64.     
  65.     OSType IACgetverbclass (void);
  66.     
  67.     OSType IACgetverbtoken (void);
  68.     
  69.     void IACparamerror (OSErr, Str255, OSType);
  70.     
  71.     Boolean IACiserrorreply (Str255);
  72.     
  73.     Boolean IACreturnerror (short, Str255);
  74.     
  75.     void IACnothandlederror (void);
  76.     
  77.     OSErr IACdrivefilelist (tyFScallback);
  78.     
  79.     OSType IACgetsender (void);
  80.  
  81.     Boolean IACnextparamisoptional (void);
  82.  
  83. /*iacsysevents.c*/
  84.  
  85.     Boolean IACinstallsystemhandler (AEEventClass, AEEventID, ProcPtr);
  86.     
  87.     Boolean IACremovesystemhandler (AEEventClass, AEEventID, ProcPtr);
  88.     
  89.     Boolean IACnewsystemverb (OSType, OSType, AppleEvent *);
  90.     
  91.     void IACremovesystemhandlers (void);
  92.     
  93. /*iacasynch.c*/
  94.     
  95.     Boolean IACsendasynch (AppleEvent *, tyAsynchCallback);
  96.  
  97. /*iacops.c*/
  98.     
  99.     pascal short IACwaitroutine (EventRecord *, long *, RgnHandle *);
  100.     
  101.     
  102. /*iacbinary.c*/
  103.     
  104.     Boolean IACpushbinaryparam (Handle, OSType, OSType);
  105.     
  106.     Boolean IACgetbinaryparam (OSType, Handle *, OSType *);
  107.     
  108.     Boolean IACreturnbinary (Handle, OSType);
  109.     
  110.     Boolean IACgetbinaryitem (AEDescList *, long, Handle *, OSType *);
  111.  
  112.     Boolean IACpushbinaryitem (AEDescList *, Handle, OSType, long);
  113.  
  114. /*iacboolean.c*/
  115.     
  116.     Boolean IACpushbooleanparam (Boolean val, OSType keyword);
  117.     
  118.     Boolean IACgetbooleanparam (OSType, Boolean *);
  119.     
  120.     Boolean IACreturnboolean (Boolean);
  121.     
  122.     Boolean IACgetbooleanitem (AEDescList *, long, Boolean *);
  123.  
  124.     Boolean IACpushbooleanitem (AEDescList *, Boolean, long);
  125.  
  126. /*iacdate.c*/
  127.     
  128.     Boolean IACpushdateparam (long, OSType);
  129.     
  130.     Boolean IACgetdateparam (OSType, long *);
  131.     
  132.     Boolean IACreturndate (long);
  133.     
  134.     Boolean IACgetdateitem (AEDescList *, long, long *);
  135.  
  136.     Boolean IACpushdateitem (AEDescList *, long, long);
  137.     
  138. /*iacdouble.c*/
  139.     
  140.     Boolean IACpushdoubleparam (double, OSType);
  141.     
  142.     Boolean IACgetdoubleparam (OSType, double *);
  143.     
  144.     Boolean IACreturndouble (double);
  145.  
  146.     Boolean IACgetdoubleitem (AEDescList *, long, double *);
  147.  
  148.     Boolean IACpushdoubleitem (AEDescList *, double, long);
  149.  
  150. /*iacfilespec.c*/
  151.     
  152.     Boolean IACpushfilespecparam (FSSpec *, OSType);
  153.     
  154.     Boolean IACgetfilespecparam (OSType, FSSpec *);
  155.     
  156.     Boolean IACreturnfilespec (FSSpec *);
  157.  
  158.     Boolean IACgetfilespecitem (AEDescList *, long, FSSpec *);
  159.  
  160.     Boolean IACpushfilespecitem (AEDescList *, FSSpec *, long);
  161.  
  162. /*iaclist.c*/
  163.  
  164.     Boolean IACpushlistparam (AEDescList *, OSType);
  165.  
  166.     Boolean IACreturnlist (AEDescList *);
  167.  
  168.     Boolean IACgetlistparam (OSType, AEDescList *);
  169.  
  170.     Boolean IACgetlistitem (AEDescList *, long, AEDescList *);
  171.  
  172.     Boolean IACpushlistitem (AEDescList *, AEDescList *, long);
  173.  
  174.     Boolean IACnewlist (AEDescList *);
  175.  
  176. /*iaclong.c*/
  177.     
  178.     Boolean IACpushlongparam (long, OSType);
  179.     
  180.     Boolean IACgetlongparam (OSType, long *);
  181.     
  182.     Boolean IACreturnlong (long);
  183.     
  184.     Boolean IACgetlongitem (AEDescList *, long, long *);
  185.  
  186.     Boolean IACpushlongitem (AEDescList *, long, long);
  187.  
  188. /*iacpoint.c*/
  189.     
  190.     Boolean IACpushpointparam (Point, OSType);
  191.     
  192.     Boolean IACgetpointparam (OSType, Point *);
  193.     
  194.     Boolean IACreturnpoint (Point);
  195.  
  196.     Boolean IACgetpointitem (AEDescList *, long, Point *);
  197.  
  198.     Boolean IACpushpointitem (AEDescList *, Point, long);
  199.  
  200. /*iacrecord.c*/
  201.  
  202.     Boolean IACpushrecordparam (AERecord *, OSType);
  203.  
  204.     Boolean IACreturnrecord (AERecord *);
  205.  
  206.     Boolean IACgetrecordparam (OSType, AERecord *);
  207.  
  208.     Boolean IACgetrecorditem (AEDescList *, long, AERecord *);
  209.  
  210.     Boolean IACpushrecorditem (AEDescList *, AERecord *, long);
  211.  
  212.     Boolean IACnewrecord (AERecord *);
  213.  
  214.     Boolean IACgetiteminfo (AERecord *, long, AEKeyword *, DescType *, Size *);
  215.  
  216. /*iacrect.c*/
  217.     
  218.     Boolean IACpushrectparam (Rect *, OSType);
  219.     
  220.     Boolean IACgetrectparam (OSType, Rect *);
  221.  
  222.     Boolean IACreturnrect (Rect *);
  223.     
  224.     Boolean IACgetrectitem(AEDescList *, long, Rect *);
  225.  
  226.     Boolean IACpushrectitem (AEDescList *, Rect *, long);
  227.     
  228. /*iacrgb.c*/
  229.     
  230.     Boolean IACpushRGBColorparam (RGBColor *, OSType);
  231.     
  232.     Boolean IACgetRGBColorparam (OSType, RGBColor *);
  233.     
  234.     Boolean IACreturnRGBColor (RGBColor *);
  235.  
  236.     Boolean IACgetRGBColoritem (AEDescList *, long, RGBColor *);
  237.  
  238.     Boolean IACpushRGBColoritem (AEDescList *, RGBColor *, long);
  239.  
  240. /*iacshort.c*/
  241.     
  242.     Boolean IACpushshortparam (short, OSType);
  243.     
  244.     Boolean IACgetshortparam (OSType, short *);
  245.     
  246.     Boolean IACreturnshort (short);
  247.     
  248.     Boolean IACgetshortitem (AEDescList *, long, short *);
  249.  
  250.     Boolean IACpushshortitem (AEDescList *, short, long);
  251.  
  252. /*iacstring.c*/
  253.     
  254.     Boolean IACpushstringparam (Str255, OSType);
  255.     
  256.     Boolean IACgetstringparam (OSType, Str255);
  257.     
  258.     Boolean IACreturnstring (Str255);
  259.  
  260.     Boolean IACgetstringitem (AEDescList *, long, Str255);
  261.  
  262.     Boolean IACpushstringitem (AEDescList *, Str255, long);
  263.  
  264. /*iacstring4.c*/
  265.     
  266.     Boolean IACpushstring4param (OSType, OSType);
  267.     
  268.     Boolean IACgetstring4param (OSType, OSType *);
  269.     
  270.     Boolean IACreturnstring4 (OSType);
  271.     
  272.     Boolean IACgetstring4item (AEDescList *, long, OSType *);
  273.  
  274.     Boolean IACpushstring4item (AEDescList *, OSType, long);
  275.  
  276. /*iactable.c*/
  277.     
  278.     Boolean IACpushtableparam (Handle, OSType);
  279.     
  280.     Boolean IACgettableparam (OSType, Handle *);
  281.     
  282.     Boolean IACreturntable (Handle);
  283.     
  284.     Boolean IACgettableitem (AEDescList *, long, Handle *);
  285.  
  286.     Boolean IACpushtableitem (AEDescList *, Handle, long);
  287.  
  288. /*iactext.c*/
  289.     
  290.     Boolean IACpushtextparam (Handle, OSType);
  291.     
  292.     Boolean IACgettextparam (OSType, Handle *);
  293.     
  294.     Boolean IACreturntext (Handle);
  295.     
  296.     Boolean IACgettextitem (AEDescList *, long, Handle *);
  297.  
  298.     Boolean IACpushtextitem (AEDescList *, Handle, long);
  299.  
  300.     
  301.     
  302.     
  303.